<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <p id="time">21:32</p>
    <script>
          setInterval(function(){
             var oDate=new Date();
             var hours=oDate.getHours();
             var minutes=oDate.getMinutes();          
             function transform(params){
                return params=params<10?"0"+params:params
             }
             document.getElementById("time").innerHTML=transform(hours)+":"+transform(minutes)
         },1000)
    </script>
</body>
</html>